﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Xna.Framework;

namespace TowerClimber
{
    static class HighScoreManager
    {
        public static void saveScore(float record)
        {
            StreamWriter writer = new StreamWriter("settings.tcb");
            writer.WriteLine(record);
            writer.Close();
        }

        public static float loadScore()
        {
            if(File.Exists("settings.tcb"))
            {
            StreamReader reader = new StreamReader("settings.tcb");
            return float.Parse(reader.ReadLine());
            }
            return 0;
        }
    }
}
